package com.bjfu.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;

import java.sql.Timestamp;
import java.time.LocalDate;
import java.time.LocalDateTime;


public class User {
    @JsonProperty("user_id")
    private Long userId;
    private String username;
    private String password;
    private Integer role;  // 0: Super Admin, 1: Team Admin, 2: Team Member, 3: Normal User
    @JsonProperty("registration_time")
    private LocalDateTime registrationTime;
    private Integer status; //  -- 用户状态     -- 状态，0未激活（待审核），1（审核通过）激活，2审核失败，3被注销
    private String permit; //这里设置了5位，DEFAULT '00011'



    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Integer getRole() {
        return role;
    }

    public void setRole(Integer role) {
        this.role = role;
    }

    public LocalDateTime getRegistrationTime() {
        return registrationTime;
    }

    public void setRegistrationTime(LocalDateTime registrationTime) {
        this.registrationTime = registrationTime;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getPermit() {
        return permit;
    }

    public void setPermit(String permit) {
        this.permit = permit;
    }
    public User(){}

    public User(Long userId, String username, String password, Integer role, LocalDateTime registrationTime, Integer status, String permit) {
        this.userId = userId;
        this.username = username;
        this.password = password;
        this.role = role;
        this.registrationTime = registrationTime;
        this.status = status;
        this.permit = permit;
    }

    @Override
    public String toString() {
        return "User{" +
                "userId=" + userId +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", role=" + role +
                ", registrationTime=" + registrationTime +
                ", status=" + status +
                ", permit='" + permit + '\'' +
                '}';
    }

}
